﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 商户收藏(显示)
    /// </summary>
    public class MerchantFavoriteDto : MerchantFavoriteEditDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Display(Name = "用户名")]
        [StringLength(128)]
        public string? UserName { get; set; }

        /// <summary>
        /// 关注时间
        /// </summary>
        [Display(Name = "关注时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 店铺名称
        /// </summary>
        [Display(Name = "店铺名称")]
        [StringLength(128)]
        public string? MerchantTitle { get; set; }
    }

    /// <summary>
    /// 商户收藏(编辑)
    /// </summary>
    public class MerchantFavoriteEditDto
    {
        /// <summary>
        /// 所属商户ID
        /// </summary>
        [Display(Name = "所属商户")]
        public int MerchantId { get; set; }

        /// <summary>
        /// 所属用户
        /// </summary>
        [Display(Name = "所属用户")]
        public int UserId { get; set; }
    }

    /// <summary>
    /// 商户收藏(关注的会员信息)
    /// </summary>
    public class MerchantFavoriteMemberDto : MembersClientDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 所属商户ID
        /// </summary>
        [Display(Name = "所属商户")]
        public int MerchantId { get; set; }

        /// <summary>
        /// 关注时间
        /// </summary>
        [Display(Name = "关注时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;
    }
}
